package com.fary.expression;

import com.fary.core.SpringException;
import com.fary.core.convert.TypeDescriptor;

public interface Expression {

	String getExpressionString();

	Object getValue() throws SpringException;

	<T> T getValue(Class<T> desiredResultType) throws SpringException;

	Object getValue(Object rootObject) throws SpringException;

	<T> T getValue(Object rootObject, Class<T> desiredResultType) throws SpringException;

	Object getValue(EvaluationContext context) throws SpringException;

	Object getValue(EvaluationContext context, Object rootObject) throws SpringException;

	<T> T getValue(EvaluationContext context, Class<T> desiredResultType) throws SpringException;

	<T> T getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) throws SpringException;

	Class<?> getValueType() throws SpringException;

	Class<?> getValueType(Object rootObject) throws SpringException;

	Class<?> getValueType(EvaluationContext context) throws SpringException;

	Class<?> getValueType(EvaluationContext context, Object rootObject) throws SpringException;

	TypeDescriptor getValueTypeDescriptor() throws SpringException;

	TypeDescriptor getValueTypeDescriptor(Object rootObject) throws SpringException;

	TypeDescriptor getValueTypeDescriptor(EvaluationContext context) throws SpringException;

	TypeDescriptor getValueTypeDescriptor(EvaluationContext context, Object rootObject) throws SpringException;

	boolean isWritable(Object rootObject) throws SpringException;

	boolean isWritable(EvaluationContext context) throws SpringException;

	boolean isWritable(EvaluationContext context, Object rootObject) throws SpringException;

	void setValue(Object rootObject, Object value) throws SpringException;

	void setValue(EvaluationContext context, Object value) throws SpringException;

	void setValue(EvaluationContext context, Object rootObject, Object value) throws SpringException;

}